import http from '@/utils/http'

// 文件上传
export namespace IUpload {
  export interface ResModel {
    url: string
    path: string
  }
}

// 文件上传接口
export class UploadApi {
  // 图片上传
  static image = (params: FormData) => {
    return http.post<IUpload.ResModel>(`/common/upload/image`, params)
  }

  // 视频上传
  static video = (params: FormData) => {
    return http.post<IUpload.ResModel>(`/common/upload/video`, params)
  }
}
